const express = require('express');
const router = express.Router();
const statsController = require('../controllers/stats.controller');
const { authenticate, authorize } = require('../middleware/auth.middleware');

// 应用认证中间件
router.use(authenticate);

// 应用管理员权限中间件
router.use(authorize('admin'));

// 统计相关路由
router.get('/', statsController.getStatistics);
router.get('/trends', statsController.getTrends);
router.get('/industry', statsController.getIndustryStats);
router.get('/salary', statsController.getSalaryStats);

module.exports = router;